//封装个人信息storage
const INFO_KEY = 'user_info'

//获取个人信息
export const getInfo = () => {
    const defaultInfo = {}
    const result = localStorage.getItem(INFO_KEY)
    return result ? JSON.parse(result) : defaultInfo
}

export const setInfo = (userInfo) => {
    localStorage.setItem(INFO_KEY, JSON.stringify(userInfo))
}
export const removeInfo = () => {
    localStorage.removeItem(INFO_KEY)
}